package com.jsz.peini.mapper.task;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.jsz.peini.bean.task.PartyInfo;
import com.jsz.peini.bean.task.PartyInfoExample;
import com.jsz.peini.vo.TaskInMapSearchVo;

public interface PartyInfoMapper {
    int countByExample(PartyInfoExample example);

    int deleteByExample(PartyInfoExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(PartyInfo record);

    public int insertSelective(PartyInfo record);

    List<PartyInfo> selectByExample(PartyInfoExample example);
    
    List<PartyInfo> selectUserPartyList(@Param("userId") String userId);
    
    List<Map<String,Object>> selectInDistance(TaskInMapSearchVo vo);

    PartyInfo selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") PartyInfo record, @Param("example") PartyInfoExample example);

    int updateByExample(@Param("record") PartyInfo record, @Param("example") PartyInfoExample example);

    int updateByPrimaryKeySelective(PartyInfo record);

    int updateByPrimaryKey(PartyInfo record);
    
    /**
     * 上下一小时的在线任务数
     */
    int selectCntByBetweenTime(@Param("userId") String userId,@Param("partyTime") Date appointedTime);
    
    List<Map<String,Object>> selectMyParty(@Param("userId") String userId,  @Param("type") String type, @Param("status") String status);
    
    List<Map<String,Object>> selectPartiesByIds(@Param("ids") String ids);
    
    void setUserPrePayed(@Param("orderId") Integer orderId, @Param("userId") String userId);
    
    void setPartyPayed(@Param("orderId") Integer orderId);
}